package com.foreknow.demo3;

/**
 * @author shkstart
 * @create 2021-07-26 13:11
 */

public class Swallow extends  Bird {
   public void fly(){
       System.out.println("fly.....");
    }
    public static  void main(String[] args){

        Swallow sw=new Swallow();
        sw.color="red";
        sw.name="eagle";
        sw.eat();
        System.out.println(sw.toString());

        Swallow sw1=new Swallow();
        sw1.name="bb";
        sw1.color="red";
        sw1.eat();
        sw1.fly();



    }

    @Override
    public String toString() {
        return "Swallow{" +
                "name='" + name + '\'' +
                ", color='" + color + '\'' +
                '}';
    }

}
